sandwichOrder = ['huotui', 'shucai', 'sanwenyu']
finshOrder = []

while sandwichOrder:
    finshOrder.append(sandwichOrder.pop())
print(finshOrder)

sandwichOrder = ['huotui', 'shucai', 'sanwenyu', 'huotui']
finshOrder = []
while sandwichOrder:
    sand=sandwichOrder.pop()
    if sand!='huotui':
      finshOrder.append(sand)
print(finshOrder)